<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>推荐图书</title>
<link rel="stylesheet" type="text/css" href="css/default.css" />
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/kindeditor/kindeditor-min.js"></script>
<script type="text/javascript" src="js/kindeditor/lang/zh_CN.js"></script>
</head>
<body>
	<div id="top" class="header">
		<table width="100%">
			<tr>
				<td width="300" style="padding-top:16px" >
					<img src="images/book.png" />
					<img src="images/a.gif" />
				</td>
			</tr>
		</table>
	</div>
	<div class="mainbox">
		<table class="topic border" style="width:100%; border-bottom-color: currentColor; border-bottom-width: 0px; border-bottom-style: none;" cellSpacing="0" cellPadding="0">
			<tr>
				<th>
				
					<h2><img src="images/a.gif" />发布要推荐图书</h2>
				</th>
			</tr>
		</table>
		<form id="articleForm" action="saveBooks" method="post">
			<table class="tablebox border" cellSpacing="0" cellPadding="0" style="width:100%;">	
				<tr id="upload_input">
					<td style="background: rgb(250, 253, 255); border-bottom-color: rgb(228, 231, 236); border-bottom-width: 1px; border-bottom-style: solid;" class="infoleft leftcolor" vAlign="middle" align="left">
						<font color=red>*</font>图书书名：
					</td>
					<td style="background: rgb(250, 253, 255); padding: 5px; border-bottom-color: rgb(228, 231, 236); border-bottom-width: 1px; border-bottom-style: solid;">
						<input id="booksName" class="FormClass" name="booksName" size="45">
						<span id="mode_chk"></span>
						&nbsp;<span id="topic_chk"></span>
					</td>
				</tr>
				<tr id="upload_input">
					<td style="background: rgb(250, 253, 255); border-bottom-color: rgb(228, 231, 236); border-bottom-width: 1px; border-bottom-style: solid;" class="infoleft leftcolor" vAlign="middle" align="left">
						<font color=red>*</font>作者：
					</td>
					<td style="background: rgb(250, 253, 255); padding: 5px; border-bottom-color: rgb(228, 231, 236); border-bottom-width: 1px; border-bottom-style: solid;">
						<input id="writer" class="FormClass" name="writer" size="45">
						<span id="mode_chk"></span>
						&nbsp;<span id="topic_chk"></span>
					</td>
					</tr>
					<tr id="upload_input">
					<td style="background: rgb(250, 253, 255); border-bottom-color: rgb(228, 231, 236); border-bottom-width: 1px; border-bottom-style: solid;" class="infoleft leftcolor" vAlign="middle" align="left">
						<font color=red>*</font>图书类型：
					</td>
					<td style="background: rgb(250, 253, 255); padding: 5px; border-bottom-color: rgb(228, 231, 236); border-bottom-width: 1px; border-bottom-style: solid;">
						<SELECT name=provinceCity name="type"> <OPTION value=0 
									  selected>请选择</OPTION> <OPTION value="计算机">计算机</OPTION> <OPTION 
									  value="英语">英语</OPTION> <OPTION value="数学">数学</OPTION> <OPTION 
									  value="散文">散文</OPTION><OPTION value="小说">小说</OPTION> </SELECT>  
						<span id="mode_chk"></span>
						&nbsp;<span id="topic_chk"></span>
					</td>
				</tr>
				<tr id="upload_input">
					<td style="background: rgb(250, 253, 255); border-bottom-color: rgb(228, 231, 236); border-bottom-width: 1px; border-bottom-style: solid;" class="infoleft leftcolor" vAlign="middle" align="left">
						<font color=red>*</font>图书出版社：
					</td>
					<td style="background: rgb(250, 253, 255); padding: 5px; border-bottom-color: rgb(228, 231, 236); border-bottom-width: 1px; border-bottom-style: solid;">
						<input id="publish" class="FormClass" name="publish" size="45">
						<span id="mode_chk"></span>
						&nbsp;<span id="topic_chk"></span>
					</td>
				</tr>
				<tr>
					<td style="background: rgb(250, 253, 255); padding: 10px 20px;" class="infoleft leftcolor" vAlign="top" align="left">
						<font color=red>*</font>图书简介：
					</td>
					<td style="margin: 0px; padding: 0px;">
						<textarea name="introduction" id="introduction" style="width: 100%; height: 200px; visibility: hidden;"></textarea>
					</td>
				</tr>
				<tr>
					<td style="text-align: center; padding:5px;" class="tablebody2" colspan="2">
						<input id="submit" class="input0" value="  发 表  " type="submit" />&nbsp;
						<input class="input0" onclick="window.close();" value="  取 消  " type="button" />
						 <input type="hidden" name="booksId" value="" /> 
					</td>
				</tr>
				</tbody>
			</table>
		</form>
	</div>
	<!---------------end 底部友情链接部分------------------->
	<div class="copyright">
		<span style="text-align:center;">Copyright &copy;2017 - 2020
			&nbsp;&nbsp;&nbsp;Powered By 桂林电子科技大学  <a href="" target="_blank">Version 1.0.0</a></span>
	</div>
</body>	
</html>
<script type="text/javascript">
		var editor;
		
		KindEditor.ready(function(K) {
			editor = K.create('textarea[name="introduction"]', {
				resizeType : 1,
				allowPreviewEmoticons : false,
				allowImageUpload : false,
				items : [ 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor',
						'bold', 'italic', 'underline', 'removeformat', '|',
						'justifyleft', 'justifycenter', 'justifyright',
						'insertorderedlist', 'insertunorderedlist', '|',
						'link' ],
				afterCreate : function() {
					this.sync();
				},
				afterBlur : function() {
					this.sync();
				}
			});
		});
		
		//验证表单
		function check(){
		     var postTitle = $("#postTitle").val();
		     var postContent = $("#postContent").val();
		     if(postTitle == ''){
		           alert("标题不能为空！");
		           return false;
		     }
		     if(postContent == '')
		     {
		         alert("内容不能为空！");
		         return false;
		     }
		     return true;
		}
</script>
